/**
 * The download info view.
 *
 * (c) Copyright 2011 Nokia Corporation. All rights reserved.
 */

import QtQuick 1.1
import com.nokia.symbian 1.1

Page {
    id: downloadInfoView;

    tools: ToolBarLayout {
         ToolButton {
             iconSource: "toolbar-back";
             onClicked: {
                 busyIndicator.opacity = 0;
                 busyIndicator.running = false;
                 downloadInfoView.pageStack.pop();
             }
         }
    }

    Flickable {
        id: flickableDownloadInfoView;

        anchors {
            fill: parent;
            leftMargin: 10;
            rightMargin: 10;
        }

        contentWidth: width;
        contentHeight: infoTopBar.height + 5 + betaDownloadInfo.height;
        flickableDirection: "VerticalFlick";

        // Top bar
        TopBar {
            id: infoTopBar;
            width: parent.width;
            height: 70;
            titleImage: "qrc:/gfx/title_download_info.png";
        }

        ScrollDecorator {
            flickableItem: flickableDownloadInfoView;
        }

        Text {
            id: betaDownloadInfo;
            anchors.top: infoTopBar.bottom;
            anchors.topMargin: 5;
            width: flickableDownloadInfoView.width;
            wrapMode: "WordWrap";

            onLinkActivated: {
                Qt.openUrlExternally(link);
            }
        }
    }

    function showDownloadInfo(downloadInfo) {
        betaDownloadInfo.text = downloadInfo;
    }
}
